﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="UcQuanLyDiem.ascx.cs" Inherits="STT.Profile.UserControlsGV.UcQuanLyDiem" %>
<div id="biography" class="page home">
    <div style="width:90%">
         <div class="row" >
            <div class="col-md-7">
            <h1 class="title"><span id="ctl02_DtlIndex_Label1_0">Quản lý điểm học viên</span></h1>
            </div>                                 
        </div>
    <div style="width:100%;background-color:#deebe1;text-align:left;font-size:20px;padding:5px;color:#006699">
       <asp:Label ID="Label6" runat="server" Text="Nhập điểm của học viên"></asp:Label>
    </div>
     <div class="row" style="margin-top:10px;margin-bottom:10px">
             <div class="col-md-7" align="center">
                 <asp:Table ID="tbnhapdiem" Width="70%" runat="server" CssClass="table table-hover">
                     <asp:TableRow>
                         <asp:TableCell Width="30%" style="text-align:right">
                             <asp:Label ID="Label3" runat="server" Text="Chọn lớp học :"></asp:Label>
                         </asp:TableCell>
                          <asp:TableCell Width="70%">
                              <asp:DropDownList ID="ddlLopHoc" runat="server" Width="90%" AutoPostBack="true" OnSelectedIndexChanged="ddlLopHoc_SelectedIndexChanged" CssClass="dropdl" ></asp:DropDownList>             
                         </asp:TableCell>
                     </asp:TableRow>
                       <asp:TableRow>
                         <asp:TableCell Width="30%" style="text-align:right">
                             <asp:Label ID="Label4" runat="server" Text="Chọn môn học :"></asp:Label>
                         </asp:TableCell>
                          <asp:TableCell Width="70%">
                              <asp:DropDownList ID="ddlMH" runat="server" Width="90%" CssClass="dropdl">
                                 <asp:ListItem Value="0">
                                      ---------Chọn--------
                                  </asp:ListItem>
                              </asp:DropDownList>             
                         </asp:TableCell>
                     </asp:TableRow>
                       <asp:TableRow>
                         <asp:TableCell Width="30%" style="text-align:right">
                             <asp:Label ID="Label5" runat="server" Text="Chọn loại điểm :"></asp:Label>
                         </asp:TableCell>
                          <asp:TableCell Width="70%">
                              <asp:DropDownList ID="ddlloaidiem" runat="server" Width="90%"  CssClass="dropdl" >
                                  <asp:ListItem Value="0">
                                      ---------Loại điểm--------
                                  </asp:ListItem>
                                   <asp:ListItem Value="1">
                                     Điểm chuyên cần
                                  </asp:ListItem>
                                   <asp:ListItem Value="2">
                                     Điểm kiểm tra
                                  </asp:ListItem>
                                   <asp:ListItem Value="3">
                                     Điểm thi
                                  </asp:ListItem>
                                 <%--  <asp:ListItem Value="4">
                                     Điểm thi lần 2
                                  </asp:ListItem>--%>
                              </asp:DropDownList>             
                         </asp:TableCell>
                     </asp:TableRow>
                 </asp:Table>
                 <div align="center">
                     <asp:Button ID="btnthemdiem" runat="server" Text="Thêm điểm" CssClass="btn btn-info" OnClick="btnthemdiem_Click" />
                 </div>
             </div>
     </div>
    <div style="width:100%;background-color:#deebe1;text-align:left;font-size:20px;padding:5px;color:#006699">
       <asp:Label ID="lbltb" runat="server" Text="Danh sách các môn học của các lớp"></asp:Label>
    </div>                          
    <asp:Panel ID="pnbangdiem" runat="server" Visible="true">
        <div>
        <asp:Panel ID="pn_dscacmon" runat="server">
         <asp:GridView ID="gvDSMonHoc" runat="server" CssClass="table table-bordered"
                AutoGenerateColumns="False" DataKeyNames="MaMonHoc" AllowPaging="True"
                 OnPageIndexChanging="gvDSMonHoc_PageIndexChanging" PageSize="7" >
                <Columns>
                    <asp:TemplateField HeaderText="Số thứ tự" 
                        SortExpression="SoThuTu">
                        <ItemTemplate>
                           <%# Container.DataItemIndex + 1 %>
                        </ItemTemplate>
                        <ItemStyle CssClass="span1" />
                    </asp:TemplateField>
                     <asp:TemplateField HeaderText="Môn học"
                        SortExpression="TenMonHoc">
                        <ItemTemplate>
                            <asp:Label ID="lblmalop" runat="server" 
                                Text='<%# Eval("Malop") %>' Visible="false"></asp:Label>
                             <asp:Label ID="lbltenlop" runat="server" 
                                Text='<%# Eval("Tenlop") %>' Visible="false"></asp:Label>
                        <asp:LinkButton ID="btntemh" runat="server" Font-Underline="true" Text='<%# Eval("TenMonHoc") %>' OnClick="btntemh_Click"></asp:LinkButton>
                        </ItemTemplate>
                        <ItemStyle CssClass="span2" />
                    </asp:TemplateField>
                    <asp:BoundField DataField="TenLop" HeaderText="Tên Lớp"
                        SortExpression="TenLop" ItemStyle-CssClass="span2">
                        <ItemStyle CssClass="span2"></ItemStyle>
                    </asp:BoundField>
                    <asp:TemplateField HeaderText="Số tiết" 
                        SortExpression="Sotiet">
                        <ItemTemplate>
                            <asp:Label ID="Label2" runat="server" 
                                Text='<%# Eval("Sotiet") %>'></asp:Label>
                        </ItemTemplate>
                        <ItemStyle CssClass="span1" />
                    </asp:TemplateField>
                       <asp:TemplateField HeaderText="Giáo viên giảng dạy" 
                        SortExpression="GiaoVienGiangDay">
                        <ItemTemplate>
                            <asp:Label ID="Label3" runat="server" 
                                Text='<%# Eval("TenGV") %>'></asp:Label>
                        </ItemTemplate>
                        <ItemStyle CssClass="span1" />
                    </asp:TemplateField>
                      <asp:TemplateField HeaderText="Số sinh viên" 
                        SortExpression="Sosinhvien">
                        <ItemTemplate>
                            <asp:Label ID="Label4" runat="server" 
                                Text='<%# Eval("Siso") %>'></asp:Label>
                        </ItemTemplate>
                        <ItemStyle CssClass="span1" />
                    </asp:TemplateField>
                      <asp:TemplateField HeaderText="Export" 
                        SortExpression="Export">
                        <ItemTemplate>
                        <asp:HyperLink ID="btnexport" CssClass="btn btn-primary" Target="_blank" NavigateUrl='<%#"~/Report/DSDProfileGV.aspx?mgv=" + Session["MaFgv"].ToString().Trim()+"&ml="+Eval("MaLop")+"&mm="+Eval("MaMonHoc")  %>' runat="server">                                     Export
                        </asp:HyperLink>
                        </ItemTemplate>
                        <ItemStyle CssClass="span1" />
                    </asp:TemplateField>
                </Columns>
             <HeaderStyle BackColor="#3366ff" ForeColor="Window"/>
            </asp:GridView>
        </asp:Panel>  
        <asp:Panel ID="pn_dsHV" runat="server" Visible="false">
        <asp:Panel ID="pnDetail" runat="server">
        <div class="row" style="padding:10px;">
           <div class="col-md-5" style="text-align:left">
               <asp:Label ID="label114" runat="server" Text="Môn học :" Font-Bold="true"></asp:Label>
               <asp:Label ID="lblmonhoc" runat="server" Text="DTNH1"></asp:Label>&nbsp&nbsp&nbsp&nbsp
               <asp:Label ID="Label11" runat="server" Text="Tên lớp :" Font-Bold="true"></asp:Label>
               <asp:Label ID="lbltenlop" runat="server" Text="DTNH1"></asp:Label>
           </div>
            <div style="text-align:right;margin-right:7px;">
                <asp:LinkButton ID="lbtnDsMH" runat="server" OnClick="lbtnDsMH_Click" Font-Underline="true">Quay lại danh sách các môn dạy</asp:LinkButton>
            </div>
        </div>
      </asp:Panel>
         <div class="btnsave">
          <asp:Label ID="lblthongbao" runat="server" Text="Chú ý : Điểm học viên nhập vào chỉ nằm trong khoảng từ 0 tới 10" ForeColor="Red">
          </asp:Label>
             &nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp &nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp &nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp
         </div>
        <div class="modal-body" style="border-bottom:thin; border-bottom-style: solid; border-bottom-color: #CCCCCC;">   
         <asp:GridView ID="GvDiemHV" runat="server" CssClass="table table-bordered table-hover"
                AutoGenerateColumns="False" DataKeyNames="Mahv" AllowPaging="True"
                 OnPageIndexChanging="gvDiemHV_PageIndexChanging" PageSize="100" OnRowDataBound="GvDiemHV_RowDataBound" >
               <Columns>
                    <asp:TemplateField HeaderText="Số thứ tự" 
                        SortExpression="SoThuTu">
                        <ItemTemplate>
                           <%# Container.DataItemIndex + 1 %>
                             <asp:Label ID="lblMamh" runat="server" 
                                Text='<%# Eval("MaMonHoc") %>' Visible="false"></asp:Label>
                        </ItemTemplate>
                        <ItemStyle CssClass="span1" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Mã học viên"
                        SortExpression="MaHV">
                        <ItemTemplate>
                             <asp:Label ID="Label7" runat="server"  Text='<%# Eval("MaHV") %>'></asp:Label>
                        </ItemTemplate>
                        <ItemStyle CssClass="span1" />
                    </asp:TemplateField>
                    <asp:BoundField DataField="TenHV" HeaderText="Họ Tên"
                        SortExpression="TenHV" ItemStyle-CssClass="span2">
                        <ItemStyle CssClass="span2"></ItemStyle>
                    </asp:BoundField>
                    <asp:BoundField DataField="Ten" HeaderText="Tên"
                        SortExpression="Ten" ItemStyle-CssClass="span2">
                        <ItemStyle CssClass="span2"></ItemStyle>
                    </asp:BoundField>
                    <asp:TemplateField HeaderText="Điểm chuyên cần"
                        SortExpression="DiemChuyenCan">
                        <ItemTemplate>
                             <asp:TextBox ID="txtdiemcc" runat="server" CssClass="point" Text='<%# Eval("DiemChuyenCan") %>' Width="40px"></asp:TextBox>
                        </ItemTemplate>
                        <ItemStyle CssClass="span1" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Điểm kiểm tra" 
                        SortExpression="DiemKiemTra">
                        <ItemTemplate>
                             <asp:TextBox ID="txtdiemkt" runat="server" CssClass="point" Text='<%# Eval("DiemKT") %>' Width="40px"></asp:TextBox>
                        </ItemTemplate>
                        <ItemStyle CssClass="span1" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Điểm thi" 
                        SortExpression="DiemThiLan1">
                        <ItemTemplate>
                             <asp:TextBox ID="txtDiemTL1" runat="server" CssClass="point" Text='<%# Eval("DiemTL1") %>' Width="40px"></asp:TextBox>
                        </ItemTemplate>
                        <ItemStyle CssClass="span1" />
                    </asp:TemplateField>
                   <%-- <asp:TemplateField HeaderText="Điểm thi lần 2" 
                        SortExpression="DiemThiLan2">
                        <ItemTemplate>
                             <asp:TextBox ID="txtDiemTL2" runat="server" CssClass="point" Text='<%# Eval("DiemTL2") %>' Width="40px"></asp:TextBox>
                        </ItemTemplate>
                        <ItemStyle CssClass="span1" />
                    </asp:TemplateField>--%>
                   <asp:TemplateField HeaderText="Điểm tổng kết" 
                        SortExpression="DiemTongKet">
                        <ItemTemplate>
                            <asp:Label ID="lblDiemTK" runat="server" Text='<%# Eval("DiemTK") %>' CssClass="point"></asp:Label>
                        </ItemTemplate>
                        <ItemStyle CssClass="span1" />
                    </asp:TemplateField>
                </Columns>
            </asp:GridView>
         </div>
        <div class="btnsave" runat="server" id="btnluugui">
            <asp:Button ID="btnluudiem" runat="server" Text="Lưu tạm" CssClass="btn btn-info" Width="100px" OnClick="btnluudiem_Click" Height="35px" />
            &nbsp&nbsp&nbsp
            <asp:Button ID="btnGuiDiem" runat="server" Text="Gửi điểm" OnClientClick="return confirm('Bạn đã chắc chắn gửi điểm cho học viên..!');" CssClass="btn btn-info" Width="100px" OnClick="btnGuiDiem_Click" Height="35px" />
        </div>
        </asp:Panel>
        <asp:Panel ID="pn_DSDiemHV" runat="server" Visible="false">
        <asp:Panel ID="Panel2" runat="server">
        <div class="row" style="padding:10px;">
           <div class="col-md-7" style="text-align:left">
               <asp:Label ID="label8" runat="server" Text="Môn học :" Font-Bold="true"></asp:Label>
               <asp:Label ID="lblmonhoc2" runat="server" Text="DTNH1"></asp:Label>&nbsp&nbsp&nbsp&nbsp
               <asp:Label ID="Label10" runat="server" Text="Tên lớp :" Font-Bold="true"></asp:Label>
               <asp:Label ID="lbltenlop2" runat="server" Text="DTNH1"></asp:Label>
           </div>
        </div>
        </asp:Panel>
         <div class="modal-body" style="border-bottom:thin; border-bottom-style: solid; border-bottom-color: #CCCCCC;">   
         <asp:GridView ID="gv_dsDiemHV" runat="server" CssClass="table table-bordered table-hover"
                AutoGenerateColumns="False" DataKeyNames="Mahv" AllowPaging="True"
                PageSize="100" >
               <Columns>
                    <asp:TemplateField HeaderText="Số thứ tự" 
                        SortExpression="SoThuTu">
                        <ItemTemplate>
                           <%# Container.DataItemIndex + 1 %>
                             <asp:Label ID="lblMamh" runat="server" 
                                Text='<%# Eval("MaMonHoc") %>' Visible="false"></asp:Label>
                        </ItemTemplate>
                        <ItemStyle CssClass="span1" />
                    </asp:TemplateField>
                   <asp:BoundField DataField="MaHV" HeaderText="Mã học viên"
                        SortExpression="MaHV" ItemStyle-CssClass="span2">
                        <ItemStyle CssClass="span2"></ItemStyle>
                    </asp:BoundField>
                    <asp:BoundField DataField="TenHV" HeaderText="Họ Tên"
                        SortExpression="TenHV" ItemStyle-CssClass="span2">
                        <ItemStyle CssClass="span2"></ItemStyle>
                    </asp:BoundField>
                    <asp:BoundField DataField="Ten" HeaderText="Tên"
                        SortExpression="Ten" ItemStyle-CssClass="span2">
                        <ItemStyle CssClass="span2"></ItemStyle>
                    </asp:BoundField>
                    <asp:TemplateField HeaderText="Điểm chuyên cần"
                        SortExpression="DiemChuyenCan">
                        <ItemTemplate>
                            <asp:Label ID="Label13" runat="server" Text='<%# Eval("DiemChuyenCan") %>'></asp:Label>
                        </ItemTemplate>
                        <ItemStyle CssClass="point" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Điểm kiểm tra" 
                        SortExpression="DiemKiemTra">
                        <ItemTemplate>
                            <asp:Label ID="Label14" runat="server" Text='<%# Eval("DiemKT") %>'></asp:Label>  
                        </ItemTemplate>
                        <ItemStyle CssClass="point" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Điểm thi" 
                        SortExpression="DiemThiLan1">
                        <ItemTemplate>
                            <asp:Label ID="Label15" runat="server" Text='<%# Eval("DiemTL1") %>' ></asp:Label> 
                        </ItemTemplate>
                        <ItemStyle CssClass="point" />
                    </asp:TemplateField>
                   <asp:TemplateField HeaderText="Điểm tổng kết" 
                        SortExpression="DiemTongKet">
                        <ItemTemplate>
                              <asp:Label ID="Label1" runat="server" Text='<%# Eval("DiemTK") %>' CssClass="point"></asp:Label>
                        </ItemTemplate>
                        <ItemStyle CssClass="point" />
                    </asp:TemplateField>
                </Columns>
            </asp:GridView>
         </div>
         <div>
             <br />
             <%-- <asp:Button ID="btnexport" runat="server" Text="Export" Visible="true" Width="70px" Height="35px" CssClass="btn-default btn" OnClick="btnexport_Click" />--%>
         </div>
        </asp:Panel>
        </div>
        <br />
<%--    <asp:Button ID="btnexport" runat="server" Text="Export" Visible="true" Width="100px" Height="40px" CssClass="btn-info btn" OnClick="btnexport_Click" />--%>
    </asp:Panel>
        </div>
 </div>